#include <bits/stdc++.h>
using namespace std;
using ll = long long;
vector<string> s;
ll n, k;
string ans;
ll cnt = 0;
int main()
{
    cin >> n;
    for (ll i = 1; i <= n; i++)
    {
        string a1;
        cin >> a1;
        s.push_back(a1);
    }
    cin >> k;
    getchar();
    // cin.ignore();
    getline(cin, ans);

    //cout << ans.size();
    if (k == 0)
    {
        cout << 0 << endl;
        cout << "He Xie Ni Quan Jia!";
    }
    else
    {
        for (int i = 0; i < s.size(); i++)
        {
            ll pos = ans.find(s[i]);
            if (pos == -1)
            {
                continue;
            }
            while (pos != -1)
            {
                cnt++;
                ans.erase(pos, s[i].size());
                ans.insert(pos, "|");
                pos = ans.find(s[i]);
            }
        }
        if (cnt >= k)
            cout << cnt << endl
                 << "He Xie Ni Quan Jia!";
        else
        {
            for (ll i = 0; i < ans.size();i++)
            {
                if(ans[i]=='|')
                {
                    cout << "<censored>";
                }
                else
                    cout << ans[i];
            }
        }
    }
}